package com.example.sys.org.service.impl;

import com.example.core.service.impl.BaseServiceImpl;
import com.example.shiro.utils.UserAuthInfo;
import com.example.sys.org.dao.SysOrgUserDao;
import com.example.sys.org.model.SysOrgUser;
import com.example.sys.org.service.SysOrgUserService;
import org.springframework.stereotype.Service;

@Service
public class SysOrgUserServiceImpl extends BaseServiceImpl<SysOrgUserDao, SysOrgUser> implements SysOrgUserService {
    @Override
    public UserAuthInfo loadUserByUserName(String username) {
        SysOrgUser sysOrgUser = getBaseDao().findSysOrgUserByFdUserName(username);
        if (sysOrgUser == null) {
            return null;
        }
        return new UserAuthInfo(sysOrgUser);
    }
}
